home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the 3D Game Programming Gurus / gurus.iso / DirectX / dx9sdkcp.exe / SDK (C++) / Include / dplay8.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-12-04  |  69.0 KB  |  1,457 lines

  1. /*==========================================================================
  2.  *
  3.  *    Copyright (C) 1998-2002 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *    File:        DPlay8.h
  6.  *    Content:    DirectPlay8 include file
  7.  *
  8.  ***************************************************************************/
  9.  
  10. #ifndef __DIRECTPLAY8_H__
  11. #define __DIRECTPLAY8_H__
  12.  
  13. #include <ole2.h>       // for DECLARE_INTERFACE_ and HRESULT
  14.  
  15. #include "dpaddr.h"
  16.  
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22.  
  23.  
  24. /****************************************************************************
  25.  *
  26.  * DirectPlay8 CLSIDs
  27.  *
  28.  ****************************************************************************/
  29.  
  30. // {743F1DC6-5ABA-429f-8BDF-C54D03253DC2}
  31. DEFINE_GUID(CLSID_DirectPlay8Client,
  32. 0x743f1dc6, 0x5aba, 0x429f, 0x8b, 0xdf, 0xc5, 0x4d, 0x3, 0x25, 0x3d, 0xc2);
  33.  
  34. // {DA825E1B-6830-43d7-835D-0B5AD82956A2}
  35. DEFINE_GUID(CLSID_DirectPlay8Server,
  36. 0xda825e1b, 0x6830, 0x43d7, 0x83, 0x5d, 0xb, 0x5a, 0xd8, 0x29, 0x56, 0xa2);
  37.  
  38. // {286F484D-375E-4458-A272-B138E2F80A6A}
  39. DEFINE_GUID(CLSID_DirectPlay8Peer,
  40. 0x286f484d, 0x375e, 0x4458, 0xa2, 0x72, 0xb1, 0x38, 0xe2, 0xf8, 0xa, 0x6a);
  41.  
  42.  
  43. // CLSIDs added for DirectX 9
  44.  
  45. // {FC47060E-6153-4b34-B975-8E4121EB7F3C}
  46. DEFINE_GUID(CLSID_DirectPlay8ThreadPool, 
  47. 0xfc47060e, 0x6153, 0x4b34, 0xb9, 0x75, 0x8e, 0x41, 0x21, 0xeb, 0x7f, 0x3c);
  48.  
  49. // {E4C1D9A2-CBF7-48bd-9A69-34A55E0D8941}
  50. DEFINE_GUID(CLSID_DirectPlay8NATResolver, 
  51. 0xe4c1d9a2, 0xcbf7, 0x48bd, 0x9a, 0x69, 0x34, 0xa5, 0x5e, 0xd, 0x89, 0x41);
  52.  
  53. /****************************************************************************
  54.  *
  55.  * DirectPlay8 Interface IIDs
  56.  *
  57.  ****************************************************************************/
  58.  
  59. typedef REFIID    DP8REFIID;
  60.  
  61.  
  62. // {5102DACD-241B-11d3-AEA7-006097B01411}
  63. DEFINE_GUID(IID_IDirectPlay8Client,
  64. 0x5102dacd, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  65.  
  66. // {5102DACE-241B-11d3-AEA7-006097B01411}
  67. DEFINE_GUID(IID_IDirectPlay8Server,
  68. 0x5102dace, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  69.  
  70. // {5102DACF-241B-11d3-AEA7-006097B01411}
  71. DEFINE_GUID(IID_IDirectPlay8Peer,
  72. 0x5102dacf, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  73.  
  74.  
  75. // IIDs added for DirectX 9
  76.  
  77. // {0D22EE73-4A46-4a0d-89B2-045B4D666425}
  78. DEFINE_GUID(IID_IDirectPlay8ThreadPool, 
  79. 0xd22ee73, 0x4a46, 0x4a0d, 0x89, 0xb2, 0x4, 0x5b, 0x4d, 0x66, 0x64, 0x25);
  80.  
  81. // {A9E213F2-9A60-486f-BF3B-53408B6D1CBB}
  82. DEFINE_GUID(IID_IDirectPlay8NATResolver, 
  83. 0xa9e213f2, 0x9a60, 0x486f, 0xbf, 0x3b, 0x53, 0x40, 0x8b, 0x6d, 0x1c, 0xbb);
  84.  
  85. /****************************************************************************
  86.  *
  87.  * DirectPlay8 Service Provider GUIDs
  88.  *
  89.  ****************************************************************************/
  90.  
  91.  
  92. // {53934290-628D-11D2-AE0F-006097B01411}
  93. DEFINE_GUID(CLSID_DP8SP_IPX,
  94. 0x53934290, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  95.  
  96.  
  97. // {6D4A3650-628D-11D2-AE0F-006097B01411}
  98. DEFINE_GUID(CLSID_DP8SP_MODEM,
  99. 0x6d4a3650, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  100.  
  101.  
  102. // {743B5D60-628D-11D2-AE0F-006097B01411}
  103. DEFINE_GUID(CLSID_DP8SP_SERIAL,
  104. 0x743b5d60, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  105.  
  106.  
  107. // {EBFE7BA0-628D-11D2-AE0F-006097B01411}
  108. DEFINE_GUID(CLSID_DP8SP_TCPIP,
  109. 0xebfe7ba0, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  110.  
  111.  
  112. // Service providers added for DirectX 9
  113.  
  114.  
  115. // {995513AF-3027-4b9a-956E-C772B3F78006}
  116. DEFINE_GUID(CLSID_DP8SP_BLUETOOTH, 
  117. 0x995513af, 0x3027, 0x4b9a, 0x95, 0x6e, 0xc7, 0x72, 0xb3, 0xf7, 0x80, 0x6);
  118.  
  119.  
  120. /****************************************************************************
  121.  *
  122.  * DirectPlay8 Interface Pointer definitions
  123.  *
  124.  ****************************************************************************/
  125.  
  126. typedef    struct IDirectPlay8Client            *PDIRECTPLAY8CLIENT;
  127.  
  128. typedef    struct IDirectPlay8Server            *PDIRECTPLAY8SERVER;
  129.  
  130. typedef    struct IDirectPlay8Peer                *PDIRECTPLAY8PEER;
  131.  
  132.  
  133. // Interface pointers added for DirectX 9
  134.  
  135. typedef    struct IDirectPlay8ThreadPool        *PDIRECTPLAY8THREADPOOL;
  136.  
  137. typedef    struct IDirectPlay8NATResolver        *PDIRECTPLAY8NATRESOLVER;
  138.  
  139. /****************************************************************************
  140.  *
  141.  * DirectPlay8 Forward Declarations For External Types
  142.  *
  143.  ****************************************************************************/
  144.  
  145. typedef struct IDirectPlay8LobbiedApplication    *PDNLOBBIEDAPPLICATION;
  146. typedef struct IDirectPlay8Address                IDirectPlay8Address;
  147.  
  148. /****************************************************************************
  149.  *
  150.  * DirectPlay8 Callback Functions
  151.  *
  152.  ****************************************************************************/
  153.  
  154. //
  155. // Callback Function Type Definition
  156. //
  157. typedef HRESULT (WINAPI *PFNDPNMESSAGEHANDLER)(PVOID,DWORD,PVOID);
  158.  
  159. /****************************************************************************
  160.  *
  161.  * DirectPlay8 Datatypes (Non-Structure / Non-Message)
  162.  *
  163.  ****************************************************************************/
  164.  
  165. //
  166. // Player IDs.  Used to uniquely identify a player in a session
  167. //
  168. typedef DWORD    DPNID,        *PDPNID;
  169.  
  170. //
  171. // Used as identifiers for operations
  172. //
  173. typedef    DWORD    DPNHANDLE,    *PDPNHANDLE;
  174.  
  175.  
  176.  
  177.  
  178. /****************************************************************************
  179.  *
  180.  * DirectPlay8 Message Identifiers
  181.  *
  182.  ****************************************************************************/
  183.  
  184. #define DPN_MSGID_OFFSET                    0xFFFF0000
  185. #define DPN_MSGID_ADD_PLAYER_TO_GROUP        ( DPN_MSGID_OFFSET | 0x0001 )
  186. #define DPN_MSGID_APPLICATION_DESC            ( DPN_MSGID_OFFSET | 0x0002 )
  187. #define DPN_MSGID_ASYNC_OP_COMPLETE            ( DPN_MSGID_OFFSET | 0x0003 )
  188. #define DPN_MSGID_CLIENT_INFO                ( DPN_MSGID_OFFSET | 0x0004 )
  189. #define DPN_MSGID_CONNECT_COMPLETE            ( DPN_MSGID_OFFSET | 0x0005 )
  190. #define DPN_MSGID_CREATE_GROUP                ( DPN_MSGID_OFFSET | 0x0006 )
  191. #define DPN_MSGID_CREATE_PLAYER                ( DPN_MSGID_OFFSET | 0x0007 )
  192. #define DPN_MSGID_DESTROY_GROUP                ( DPN_MSGID_OFFSET | 0x0008 )
  193. #define DPN_MSGID_DESTROY_PLAYER            ( DPN_MSGID_OFFSET | 0x0009 )
  194. #define DPN_MSGID_ENUM_HOSTS_QUERY            ( DPN_MSGID_OFFSET | 0x000a )
  195. #define DPN_MSGID_ENUM_HOSTS_RESPONSE        ( DPN_MSGID_OFFSET | 0x000b )
  196. #define DPN_MSGID_GROUP_INFO                ( DPN_MSGID_OFFSET | 0x000c )
  197. #define DPN_MSGID_HOST_MIGRATE                ( DPN_MSGID_OFFSET | 0x000d )
  198. #define DPN_MSGID_INDICATE_CONNECT            ( DPN_MSGID_OFFSET | 0x000e )
  199. #define DPN_MSGID_INDICATED_CONNECT_ABORTED    ( DPN_MSGID_OFFSET | 0x000f )
  200. #define DPN_MSGID_PEER_INFO                    ( DPN_MSGID_OFFSET | 0x0010 )
  201. #define DPN_MSGID_RECEIVE                    ( DPN_MSGID_OFFSET | 0x0011 )
  202. #define DPN_MSGID_REMOVE_PLAYER_FROM_GROUP    ( DPN_MSGID_OFFSET | 0x0012 )
  203. #define DPN_MSGID_RETURN_BUFFER                ( DPN_MSGID_OFFSET | 0x0013 )
  204. #define DPN_MSGID_SEND_COMPLETE                ( DPN_MSGID_OFFSET | 0x0014 )
  205. #define DPN_MSGID_SERVER_INFO                ( DPN_MSGID_OFFSET | 0x0015 )
  206. #define DPN_MSGID_TERMINATE_SESSION            ( DPN_MSGID_OFFSET | 0x0016 )
  207.  
  208. // Messages added for DirectX 9
  209. #define DPN_MSGID_CREATE_THREAD                ( DPN_MSGID_OFFSET | 0x0017 )
  210. #define DPN_MSGID_DESTROY_THREAD            ( DPN_MSGID_OFFSET | 0x0018 )
  211. #define DPN_MSGID_NAT_RESOLVER_QUERY        ( DPN_MSGID_OFFSET | 0x0101 )
  212.  
  213. /****************************************************************************
  214.  *
  215.  * DirectPlay8 Constants
  216.  *
  217.  ****************************************************************************/
  218.  
  219. #define DPNID_ALL_PLAYERS_GROUP                0
  220.  
  221. //
  222. // DESTROY_GROUP reasons
  223. //
  224. #define DPNDESTROYGROUPREASON_NORMAL                0x0001
  225. #define DPNDESTROYGROUPREASON_AUTODESTRUCTED        0x0002
  226. #define DPNDESTROYGROUPREASON_SESSIONTERMINATED        0x0003
  227.  
  228. //
  229. // DESTROY_PLAYER reasons
  230. //
  231. #define DPNDESTROYPLAYERREASON_NORMAL                0x0001
  232. #define DPNDESTROYPLAYERREASON_CONNECTIONLOST        0x0002
  233. #define DPNDESTROYPLAYERREASON_SESSIONTERMINATED    0x0003
  234. #define DPNDESTROYPLAYERREASON_HOSTDESTROYEDPLAYER    0x0004
  235.  
  236. #define DPN_MAX_APPDESC_RESERVEDDATA_SIZE            64
  237.  
  238.  
  239.  
  240. /****************************************************************************
  241.  *
  242.  * DirectPlay8 Flags
  243.  *
  244.  ****************************************************************************/
  245.  
  246. //
  247. // Asynchronous operation flags (for Async Ops)
  248. //
  249. #define DPNOP_SYNC                                0x80000000
  250.  
  251. //
  252. // Add player to group flags (for AddPlayerToGroup)
  253. //
  254. #define DPNADDPLAYERTOGROUP_SYNC                DPNOP_SYNC
  255.  
  256. //
  257. // Cancel flags
  258. //
  259. #define DPNCANCEL_CONNECT                        0x00000001
  260. #define DPNCANCEL_ENUM                            0x00000002
  261. #define DPNCANCEL_SEND                            0x00000004
  262. #define DPNCANCEL_ALL_OPERATIONS                0x00008000
  263. // Flags added for DirectX 9
  264. #define DPNCANCEL_PLAYER_SENDS                    0x80000000
  265. #define DPNCANCEL_PLAYER_SENDS_PRIORITY_HIGH    (DPNCANCEL_PLAYER_SENDS | 0x00010000)
  266. #define DPNCANCEL_PLAYER_SENDS_PRIORITY_NORMAL    (DPNCANCEL_PLAYER_SENDS | 0x00020000)
  267. #define DPNCANCEL_PLAYER_SENDS_PRIORITY_LOW        (DPNCANCEL_PLAYER_SENDS | 0x00040000)
  268.  
  269. //
  270. // Close flags (for Close, added for DirectX 9)
  271. //
  272. #define DPNCLOSE_IMMEDIATE                        0x00000001
  273.  
  274. //
  275. // Connect flags (for Connect)
  276. //
  277. #define DPNCONNECT_SYNC                            DPNOP_SYNC
  278. #define DPNCONNECT_OKTOQUERYFORADDRESSING        0x0001
  279.  
  280. //
  281. // Create group flags (for CreateGroup)
  282. //
  283. #define DPNCREATEGROUP_SYNC                        DPNOP_SYNC
  284.  
  285. //
  286. // Destroy group flags (for DestroyGroup)
  287. //
  288. #define DPNDESTROYGROUP_SYNC                    DPNOP_SYNC
  289.  
  290. //
  291. // Enumerate clients and groups flags (for EnumPlayersAndGroups)
  292. //
  293. #define DPNENUM_PLAYERS                            0x0001
  294. #define DPNENUM_GROUPS                            0x0010
  295.  
  296. //
  297. // Enum hosts flags (for EnumHosts)
  298. //
  299. #define DPNENUMHOSTS_SYNC                        DPNOP_SYNC
  300. #define DPNENUMHOSTS_OKTOQUERYFORADDRESSING        0x0001
  301. #define DPNENUMHOSTS_NOBROADCASTFALLBACK        0x0002
  302.  
  303. //
  304. // Enum service provider flags (for EnumSP)
  305. //
  306. #define DPNENUMSERVICEPROVIDERS_ALL                0x0001
  307.  
  308. //
  309. // GetLocalHostAddresses flags (added for DirectX 9)
  310. //
  311. #define DPNGETLOCALHOSTADDRESSES_COMBINED        0x0001
  312.  
  313. //
  314. // Get send queue info flags (for GetSendQueueInfo)
  315. //
  316. #define DPNGETSENDQUEUEINFO_PRIORITY_NORMAL        0x0001
  317. #define DPNGETSENDQUEUEINFO_PRIORITY_HIGH        0x0002
  318. #define DPNGETSENDQUEUEINFO_PRIORITY_LOW        0x0004
  319.  
  320. //
  321. // Group information flags (for Group Info)
  322. //
  323. #define DPNGROUP_AUTODESTRUCT                    0x0001
  324.  
  325. //
  326. // Host flags (for Host)
  327. //
  328. #define DPNHOST_OKTOQUERYFORADDRESSING            0x0001
  329.  
  330. //
  331. // Set info
  332. //
  333. #define DPNINFO_NAME                            0x0001
  334. #define DPNINFO_DATA                            0x0002
  335.  
  336. //
  337. // Initialize flags (for Initialize)
  338. //
  339. #define DPNINITIALIZE_DISABLEPARAMVAL            0x0001
  340. // Flags added for DirectX 9
  341. #define DPNINITIALIZE_HINT_LANSESSION            0x0002
  342. #define DPNINITIALIZE_DISABLELINKTUNING            0x0004
  343.  
  344.  
  345. //
  346. // Register Lobby flags
  347. //
  348. #define DPNLOBBY_REGISTER                        0x0001
  349. #define DPNLOBBY_UNREGISTER                        0x0002
  350.  
  351. //
  352. // Player information flags (for Player Info / Player Messages)
  353. //
  354. #define DPNPLAYER_LOCAL                            0x0002
  355. #define DPNPLAYER_HOST                            0x0004
  356.  
  357. //
  358. // Receive indication flags (added for DirectX 9)
  359. //
  360. #define DPNRECEIVE_GUARANTEED                    0x0001
  361. #define DPNRECEIVE_COALESCED                    0x0002
  362.  
  363. //
  364. // Remove player from group flags (for RemovePlayerFromGroup)
  365. //
  366. #define DPNREMOVEPLAYERFROMGROUP_SYNC            DPNOP_SYNC
  367.  
  368. //
  369. // Send flags (for Send/SendTo)
  370. //
  371. #define DPNSEND_SYNC                            DPNOP_SYNC
  372. #define DPNSEND_NOCOPY                            0x0001
  373. #define DPNSEND_NOCOMPLETE                        0x0002
  374. #define DPNSEND_COMPLETEONPROCESS                0x0004
  375. #define DPNSEND_GUARANTEED                        0x0008
  376. #define DPNSEND_NONSEQUENTIAL                    0x0010
  377. #define DPNSEND_NOLOOPBACK                        0x0020
  378. #define DPNSEND_PRIORITY_LOW                    0x0040
  379. #define DPNSEND_PRIORITY_HIGH                    0x0080
  380. // Flag added for DirectX 9
  381. #define DPNSEND_COALESCE                        0x0100
  382.  
  383. //
  384. // Send complete indication flags (added for DirectX 9)
  385. //
  386. #define DPNSENDCOMPLETE_GUARANTEED                0x0001
  387. #define DPNSENDCOMPLETE_COALESCED                0x0002
  388.  
  389. //
  390. // Session Flags (for DPN_APPLICATION_DESC)
  391. //
  392. #define DPNSESSION_CLIENT_SERVER                0x0001
  393. #define DPNSESSION_MIGRATE_HOST                    0x0004
  394. #define DPNSESSION_NODPNSVR                        0x0040
  395. #define DPNSESSION_REQUIREPASSWORD                0x0080
  396. // Flag added for DirectX 9
  397. #define DPNSESSION_NOENUMS                        0x0100
  398. #define DPNSESSION_FAST_SIGNED                    0x0200
  399. #define DPNSESSION_FULL_SIGNED                    0x0400
  400.  
  401. //
  402. // Set client info flags (for SetClientInfo)
  403. //
  404. #define DPNSETCLIENTINFO_SYNC                    DPNOP_SYNC
  405.  
  406. //
  407. // Set group info flags (for SetGroupInfo)
  408. //
  409. #define DPNSETGROUPINFO_SYNC                    DPNOP_SYNC
  410.  
  411. //
  412. // Set peer info flags (for SetPeerInfo)
  413. //
  414. #define DPNSETPEERINFO_SYNC                        DPNOP_SYNC
  415.  
  416. //
  417. // Set server info flags (for SetServerInfo)
  418. //
  419. #define DPNSETSERVERINFO_SYNC                    DPNOP_SYNC
  420.  
  421. //
  422. // SP capabilities flags
  423. //
  424. #define DPNSPCAPS_SUPPORTSDPNSVR                0x0001
  425. #define DPNSPCAPS_SUPPORTSDPNSRV                DPNSPCAPS_SUPPORTSDPNSVR
  426. #define DPNSPCAPS_SUPPORTSBROADCAST                0x0002
  427. #define DPNSPCAPS_SUPPORTSALLADAPTERS            0x0004
  428. // Flags added for DirectX 9
  429. #define DPNSPCAPS_SUPPORTSTHREADPOOL            0x0008
  430. #define DPNSPCAPS_NETWORKSIMULATOR                0x0010
  431.  
  432. //
  433. // SP information flags (added for DirectX 9)
  434. //
  435. #define DPNSPINFO_NETWORKSIMULATORDEVICE        0x0001
  436.  
  437. /****************************************************************************
  438.  *
  439.  * DirectPlay8 Structures (Non-Message)
  440.  *
  441.  ****************************************************************************/
  442.  
  443. //
  444. // Application description
  445. //
  446. typedef struct    _DPN_APPLICATION_DESC
  447. {
  448.     DWORD    dwSize;                            // Size of this structure
  449.     DWORD    dwFlags;                        // Flags (DPNSESSION_...)
  450.     GUID    guidInstance;                    // Instance GUID
  451.     GUID    guidApplication;                // Application GUID
  452.     DWORD    dwMaxPlayers;                    // Maximum # of players allowed (0=no limit)
  453.     DWORD    dwCurrentPlayers;                // Current # of players allowed
  454.     WCHAR    *pwszSessionName;                // Name of the session
  455.     WCHAR    *pwszPassword;                    // Password for the session
  456.     PVOID    pvReservedData;                    
  457.     DWORD    dwReservedDataSize;
  458.     PVOID    pvApplicationReservedData;
  459.     DWORD    dwApplicationReservedDataSize;
  460. } DPN_APPLICATION_DESC, *PDPN_APPLICATION_DESC;
  461.  
  462. //
  463. // Generic Buffer Description
  464. //
  465. typedef struct    _BUFFERDESC
  466. {
  467.     DWORD    dwBufferSize;        
  468.     BYTE *     pBufferData;        
  469. } BUFFERDESC, DPN_BUFFER_DESC, *PDPN_BUFFER_DESC;
  470.  
  471. typedef BUFFERDESC    FAR * PBUFFERDESC;
  472.  
  473. //
  474. // DirectPlay8 capabilities
  475. //
  476. typedef struct    _DPN_CAPS
  477. {
  478.     DWORD    dwSize;                        // Size of this structure
  479.     DWORD    dwFlags;                        // Flags
  480.     DWORD    dwConnectTimeout;            // ms before a connect request times out
  481.     DWORD    dwConnectRetries;                // # of times to attempt the connection
  482.     DWORD    dwTimeoutUntilKeepAlive;        // ms of inactivity before a keep alive is sent
  483. } DPN_CAPS, *PDPN_CAPS;
  484.  
  485. //
  486. // Extended capabilities structures (added for DirectX 9)
  487. //
  488. typedef struct    _DPN_CAPS_EX
  489. {
  490.     DWORD    dwSize;                        // Size of this structure
  491.     DWORD    dwFlags;                        // Flags
  492.     DWORD    dwConnectTimeout;            // ms before a connect request times out
  493.     DWORD    dwConnectRetries;                // # of times to attempt the connection
  494.     DWORD    dwTimeoutUntilKeepAlive;        // ms of inactivity before a keep alive is sent
  495.     DWORD    dwMaxRecvMsgSize;            // maximum size in bytes of message that can be received
  496.     DWORD    dwNumSendRetries;            // maximum number of send retries before link is considered dead
  497.     DWORD    dwMaxSendRetryInterval;        // maximum period in msec between send retries
  498.     DWORD    dwDropThresholdRate;            // percentage of dropped packets before throttling
  499.     DWORD    dwThrottleRate;                // percentage amount to reduce send window when throttling
  500.     DWORD    dwNumHardDisconnectSends;    // number of hard disconnect frames to send when close immediate flag is specified
  501.     DWORD    dwMaxHardDisconnectPeriod;    // maximum period between hard disconnect sends
  502. } DPN_CAPS_EX, *PDPN_CAPS_EX;
  503.  
  504. //
  505. // Connection Statistics information
  506. //
  507. typedef struct _DPN_CONNECTION_INFO
  508. {
  509.     DWORD    dwSize;
  510.     DWORD    dwRoundTripLatencyMS;
  511.     DWORD    dwThroughputBPS;
  512.     DWORD    dwPeakThroughputBPS;
  513.  
  514.     DWORD    dwBytesSentGuaranteed;
  515.     DWORD    dwPacketsSentGuaranteed;
  516.     DWORD    dwBytesSentNonGuaranteed;
  517.     DWORD    dwPacketsSentNonGuaranteed;
  518.  
  519.     DWORD    dwBytesRetried;        // Guaranteed only
  520.     DWORD    dwPacketsRetried;    // Guaranteed only
  521.     DWORD    dwBytesDropped;        // Non Guaranteed only
  522.     DWORD    dwPacketsDropped;    // Non Guaranteed only
  523.  
  524.     DWORD    dwMessagesTransmittedHighPriority;
  525.     DWORD    dwMessagesTimedOutHighPriority;
  526.     DWORD    dwMessagesTransmittedNormalPriority;
  527.     DWORD    dwMessagesTimedOutNormalPriority;
  528.     DWORD    dwMessagesTransmittedLowPriority;
  529.     DWORD    dwMessagesTimedOutLowPriority;
  530.  
  531.     DWORD    dwBytesReceivedGuaranteed;
  532.     DWORD    dwPacketsReceivedGuaranteed;
  533.     DWORD    dwBytesReceivedNonGuaranteed;
  534.     DWORD    dwPacketsReceivedNonGuaranteed;
  535.     DWORD    dwMessagesReceived;
  536.  
  537. } DPN_CONNECTION_INFO, *PDPN_CONNECTION_INFO;
  538.  
  539.  
  540. //
  541. // Group information structure
  542. //
  543. typedef struct    _DPN_GROUP_INFO
  544. {
  545.     DWORD    dwSize;                // size of this structure
  546.     DWORD    dwInfoFlags;        // information contained
  547.     PWSTR    pwszName;            // Unicode Name
  548.     PVOID    pvData;                // data block
  549.     DWORD    dwDataSize;            // size in BYTES of data block
  550.     DWORD    dwGroupFlags;        // group flags (DPNGROUP_...)
  551. } DPN_GROUP_INFO, *PDPN_GROUP_INFO;
  552.  
  553. //
  554. // Player information structure
  555. //
  556. typedef struct    _DPN_PLAYER_INFO
  557. {
  558.     DWORD    dwSize;                // size of this structure
  559.     DWORD    dwInfoFlags;        // information contained
  560.     PWSTR    pwszName;            // Unicode Name
  561.     PVOID    pvData;                // data block
  562.     DWORD    dwDataSize;            // size in BYTES of data block
  563.     DWORD    dwPlayerFlags;        // player flags (DPNPLAYER_...)
  564. } DPN_PLAYER_INFO, *PDPN_PLAYER_INFO;
  565.  
  566. typedef struct _DPN_SECURITY_CREDENTIALS    DPN_SECURITY_CREDENTIALS, *PDPN_SECURITY_CREDENTIALS;
  567. typedef struct _DPN_SECURITY_DESC            DPN_SECURITY_DESC, *PDPN_SECURITY_DESC;
  568.  
  569. //
  570. // Service provider & adapter enumeration structure
  571. //
  572. typedef struct _DPN_SERVICE_PROVIDER_INFO
  573. {
  574.     DWORD        dwFlags;
  575.     GUID        guid;        // SP Guid
  576.     WCHAR        *pwszName;    // Friendly Name
  577.     PVOID        pvReserved;    
  578.     DWORD        dwReserved;
  579. } DPN_SERVICE_PROVIDER_INFO, *PDPN_SERVICE_PROVIDER_INFO;
  580.  
  581. //
  582. // Service provider caps structure
  583. //
  584. typedef struct _DPN_SP_CAPS
  585. {
  586.     DWORD    dwSize;                            // Size of this structure
  587.     DWORD    dwFlags;                        // Flags (DPNSPCAPS_...)
  588.     DWORD    dwNumThreads;                    // # of worker threads to use
  589.     DWORD    dwDefaultEnumCount;                // default # of enum requests
  590.     DWORD    dwDefaultEnumRetryInterval;        // default ms between enum requests
  591.     DWORD    dwDefaultEnumTimeout;            // default enum timeout
  592.     DWORD    dwMaxEnumPayloadSize;            // maximum size in bytes for enum payload data
  593.     DWORD    dwBuffersPerThread;                // number of receive buffers per thread
  594.     DWORD    dwSystemBufferSize;                // amount of buffering to do in addition to posted receive buffers
  595. } DPN_SP_CAPS, *PDPN_SP_CAPS;
  596.  
  597.  
  598. /****************************************************************************
  599.  *
  600.  * IDirectPlay8 message handler call back structures
  601.  *
  602.  ****************************************************************************/
  603.  
  604. //
  605. // Add player to group structure for message handler
  606. // (DPN_MSGID_ADD_PLAYER_TO_GROUP)
  607. //
  608. typedef struct    _DPNMSG_ADD_PLAYER_TO_GROUP
  609. {
  610.     DWORD    dwSize;                // Size of this structure
  611.     DPNID    dpnidGroup;            // DPNID of group
  612.     PVOID    pvGroupContext;        // Group context value
  613.     DPNID    dpnidPlayer;        // DPNID of added player
  614.     PVOID    pvPlayerContext;    // Player context value
  615. } DPNMSG_ADD_PLAYER_TO_GROUP, *PDPNMSG_ADD_PLAYER_TO_GROUP;
  616.  
  617. //
  618. // Async operation completion structure for message handler
  619. // (DPN_MSGID_ASYNC_OP_COMPLETE)
  620. //
  621. typedef struct    _DPNMSG_ASYNC_OP_COMPLETE
  622. {
  623.     DWORD        dwSize;            // Size of this structure
  624.     DPNHANDLE    hAsyncOp;        // DirectPlay8 async operation handle
  625.     PVOID        pvUserContext;    // User context supplied
  626.     HRESULT        hResultCode;    // HRESULT of operation
  627. } DPNMSG_ASYNC_OP_COMPLETE, *PDPNMSG_ASYNC_OP_COMPLETE;
  628.  
  629. //
  630. // Client info structure for message handler
  631. // (DPN_MSGID_CLIENT_INFO)
  632. //
  633. typedef struct    _DPNMSG_CLIENT_INFO
  634. {
  635.     DWORD    dwSize;                // Size of this structure
  636.     DPNID    dpnidClient;        // DPNID of client
  637.     PVOID    pvPlayerContext;    // Player context value
  638. } DPNMSG_CLIENT_INFO, *PDPNMSG_CLIENT_INFO;
  639.  
  640. //
  641. // Connect complete structure for message handler
  642. // (DPN_MSGID_CONNECT_COMPLETE)
  643. //
  644. typedef struct    _DPNMSG_CONNECT_COMPLETE
  645. {
  646.     DWORD        dwSize;                        // Size of this structure
  647.     DPNHANDLE    hAsyncOp;                    // DirectPlay8 Async operation handle
  648.     PVOID        pvUserContext;                // User context supplied at Connect
  649.     HRESULT        hResultCode;                // HRESULT of connection attempt
  650.     PVOID        pvApplicationReplyData;        // Connection reply data from Host/Server
  651.     DWORD        dwApplicationReplyDataSize;    // Size (in bytes) of pvApplicationReplyData
  652.  
  653.     // Fields added for DirectX 9
  654.     DPNID        dpnidLocal;                    // DPNID of local player
  655. } DPNMSG_CONNECT_COMPLETE, *PDPNMSG_CONNECT_COMPLETE;
  656.  
  657. //
  658. // Create group structure for message handler
  659. // (DPN_MSGID_CREATE_GROUP)
  660. //
  661. typedef struct    _DPNMSG_CREATE_GROUP
  662. {
  663.     DWORD    dwSize;                // Size of this structure
  664.     DPNID    dpnidGroup;            // DPNID of new group
  665.     DPNID    dpnidOwner;            // Owner of newgroup
  666.     PVOID    pvGroupContext;        // Group context value
  667.  
  668.     // Fields added for DirectX 9
  669.     PVOID    pvOwnerContext;        // Owner context value
  670. } DPNMSG_CREATE_GROUP, *PDPNMSG_CREATE_GROUP;
  671.  
  672. //
  673. // Create player structure for message handler
  674. // (DPN_MSGID_CREATE_PLAYER)
  675. //
  676. typedef struct    _DPNMSG_CREATE_PLAYER
  677. {
  678.     DWORD    dwSize;                // Size of this structure
  679.     DPNID    dpnidPlayer;        // DPNID of new player
  680.     PVOID    pvPlayerContext;    // Player context value
  681. } DPNMSG_CREATE_PLAYER, *PDPNMSG_CREATE_PLAYER;
  682.  
  683. //
  684. // Destroy group structure for message handler
  685. // (DPN_MSGID_DESTROY_GROUP)
  686. //
  687. typedef struct    _DPNMSG_DESTROY_GROUP
  688. {
  689.     DWORD    dwSize;                // Size of this structure
  690.     DPNID    dpnidGroup;            // DPNID of destroyed group
  691.     PVOID    pvGroupContext;        // Group context value
  692.     DWORD    dwReason;            // Information only
  693. } DPNMSG_DESTROY_GROUP, *PDPNMSG_DESTROY_GROUP;
  694.  
  695. //
  696. // Destroy player structure for message handler
  697. // (DPN_MSGID_DESTROY_PLAYER)
  698. //
  699. typedef struct    _DPNMSG_DESTROY_PLAYER
  700. {
  701.     DWORD    dwSize;                // Size of this structure
  702.     DPNID    dpnidPlayer;        // DPNID of leaving player
  703.     PVOID    pvPlayerContext;    // Player context value
  704.     DWORD    dwReason;            // Information only
  705. } DPNMSG_DESTROY_PLAYER, *PDPNMSG_DESTROY_PLAYER;
  706.  
  707. //
  708. // Enumeration request received structure for message handler
  709. // (DPN_MSGID_ENUM_HOSTS_QUERY)
  710. //
  711. typedef    struct    _DPNMSG_ENUM_HOSTS_QUERY
  712. {
  713.     DWORD                dwSize;                 // Size of this structure.
  714.     IDirectPlay8Address *pAddressSender;        // Address of client who sent the request
  715.     IDirectPlay8Address    *pAddressDevice;        // Address of device request was received on
  716.     PVOID                pvReceivedData;         // Request data (set on client)
  717.     DWORD                dwReceivedDataSize;     // Request data size (set on client)
  718.     DWORD                dwMaxResponseDataSize;    // Max allowable size of enum response
  719.     PVOID                pvResponseData;            // Optional query repsonse (user set)
  720.     DWORD                dwResponseDataSize;        // Optional query response size (user set)
  721.     PVOID                pvResponseContext;        // Optional query response context (user set)
  722. } DPNMSG_ENUM_HOSTS_QUERY, *PDPNMSG_ENUM_HOSTS_QUERY;
  723.  
  724. //
  725. // Enumeration response received structure for message handler
  726. // (DPN_MSGID_ENUM_HOSTS_RESPONSE)
  727. //
  728. typedef    struct    _DPNMSG_ENUM_HOSTS_RESPONSE
  729. {
  730.     DWORD                        dwSize;                     // Size of this structure
  731.     IDirectPlay8Address            *pAddressSender;            // Address of host who responded
  732.     IDirectPlay8Address            *pAddressDevice;            // Device response was received on
  733.     const DPN_APPLICATION_DESC    *pApplicationDescription;    // Application description for the session
  734.     PVOID                        pvResponseData;             // Optional response data (set on host)
  735.     DWORD                        dwResponseDataSize;         // Optional response data size (set on host)
  736.     PVOID                        pvUserContext;                // Context value supplied for enumeration
  737.     DWORD                        dwRoundTripLatencyMS;        // Round trip latency in MS
  738. } DPNMSG_ENUM_HOSTS_RESPONSE, *PDPNMSG_ENUM_HOSTS_RESPONSE;
  739.  
  740. //
  741. // Group info structure for message handler
  742. // (DPN_MSGID_GROUP_INFO)
  743. //
  744. typedef struct    _DPNMSG_GROUP_INFO
  745. {
  746.     DWORD    dwSize;                    // Size of this structure
  747.     DPNID    dpnidGroup;                // DPNID of group
  748.     PVOID    pvGroupContext;            // Group context value
  749. } DPNMSG_GROUP_INFO, *PDPNMSG_GROUP_INFO;
  750.  
  751. //
  752. // Migrate host structure for message handler
  753. // (DPN_MSGID_HOST_MIGRATE)
  754. //
  755. typedef struct    _DPNMSG_HOST_MIGRATE
  756. {
  757.     DWORD    dwSize;                    // Size of this structure
  758.     DPNID    dpnidNewHost;            // DPNID of new Host player
  759.     PVOID    pvPlayerContext;        // Player context value
  760. } DPNMSG_HOST_MIGRATE, *PDPNMSG_HOST_MIGRATE;
  761.  
  762. //
  763. // Indicate connect structure for message handler
  764. // (DPN_MSGID_INDICATE_CONNECT)
  765. //
  766. typedef struct    _DPNMSG_INDICATE_CONNECT
  767. {
  768.     DWORD                dwSize;                    // Size of this structure
  769.     PVOID                pvUserConnectData;        // Connecting player data
  770.     DWORD                dwUserConnectDataSize;    // Size (in bytes) of pvUserConnectData
  771.     PVOID                pvReplyData;            // Connection reply data
  772.     DWORD                dwReplyDataSize;        // Size (in bytes) of pvReplyData
  773.     PVOID                pvReplyContext;            // Buffer context for pvReplyData
  774.     PVOID                pvPlayerContext;        // Player context preset
  775.     IDirectPlay8Address    *pAddressPlayer;        // Address of connecting player
  776.     IDirectPlay8Address    *pAddressDevice;        // Address of device receiving connect attempt
  777. } DPNMSG_INDICATE_CONNECT, *PDPNMSG_INDICATE_CONNECT;
  778.  
  779. //
  780. // Indicated connect aborted structure for message handler
  781. // (DPN_MSGID_INDICATED_CONNECT_ABORTED)
  782. //
  783. typedef struct    _DPNMSG_INDICATED_CONNECT_ABORTED
  784. {
  785.     DWORD        dwSize;                // Size of this structure
  786.     PVOID        pvPlayerContext;    // Player context preset from DPNMSG_INDICATE_CONNECT
  787. } DPNMSG_INDICATED_CONNECT_ABORTED, *PDPNMSG_INDICATED_CONNECT_ABORTED;
  788.  
  789. //
  790. // Peer info structure for message handler
  791. // (DPN_MSGID_PEER_INFO)
  792. //
  793. typedef struct    _DPNMSG_PEER_INFO
  794. {
  795.     DWORD    dwSize;                    // Size of this structure
  796.     DPNID    dpnidPeer;                // DPNID of peer
  797.     PVOID    pvPlayerContext;        // Player context value
  798. } DPNMSG_PEER_INFO, *PDPNMSG_PEER_INFO;
  799.  
  800. //
  801. // Receive structure for message handler
  802. // (DPN_MSGID_RECEIVE)
  803. //
  804. typedef struct    _DPNMSG_RECEIVE
  805. {
  806.     DWORD        dwSize;                // Size of this structure
  807.     DPNID        dpnidSender;        // DPNID of sending player
  808.     PVOID        pvPlayerContext;    // Player context value of sending player
  809.     PBYTE        pReceiveData;        // Received data
  810.     DWORD        dwReceiveDataSize;    // Size (in bytes) of pReceiveData
  811.     DPNHANDLE    hBufferHandle;        // Buffer handle for pReceiveData
  812.  
  813.     // Fields added for DirectX 9
  814.     DWORD        dwReceiveFlags;        // Flags describing how message was received
  815. } DPNMSG_RECEIVE, *PDPNMSG_RECEIVE;
  816.  
  817. //
  818. // Remove player from group structure for message handler
  819. // (DPN_MSGID_REMOVE_PLAYER_FROM_GROUP)
  820. //
  821. typedef struct    _DPNMSG_REMOVE_PLAYER_FROM_GROUP
  822. {
  823.     DWORD    dwSize;                    // Size of this structure
  824.     DPNID    dpnidGroup;                // DPNID of group
  825.     PVOID    pvGroupContext;            // Group context value
  826.     DPNID    dpnidPlayer;            // DPNID of deleted player
  827.     PVOID    pvPlayerContext;        // Player context value
  828. } DPNMSG_REMOVE_PLAYER_FROM_GROUP, *PDPNMSG_REMOVE_PLAYER_FROM_GROUP;
  829.  
  830. //
  831. // Returned buffer structure for message handler
  832. // (DPN_MSGID_RETURN_BUFFER)
  833. //
  834. typedef struct    _DPNMSG_RETURN_BUFFER
  835. {
  836.     DWORD        dwSize;                // Size of this structure
  837.     HRESULT        hResultCode;        // Return value of operation
  838.     PVOID        pvBuffer;            // Buffer being returned
  839.     PVOID        pvUserContext;        // Context associated with buffer
  840. } DPNMSG_RETURN_BUFFER, *PDPNMSG_RETURN_BUFFER;
  841.  
  842. //
  843. // Send complete structure for message handler
  844. // (DPN_MSGID_SEND_COMPLETE)
  845. //
  846. typedef struct    _DPNMSG_SEND_COMPLETE
  847. {
  848.     DWORD                dwSize;                    // Size of this structure
  849.     DPNHANDLE            hAsyncOp;                // DirectPlay8 Async operation handle
  850.     PVOID                pvUserContext;            // User context supplied at Send/SendTo
  851.     HRESULT                hResultCode;            // HRESULT of send
  852.     DWORD                dwSendTime;                // Send time in ms
  853.  
  854.     // Fields added for DirectX 9
  855.     DWORD                dwFirstFrameRTT;        // RTT of the first frame in the message
  856.     DWORD                dwFirstFrameRetryCount;    // Retry count of the first frame
  857.     DWORD                dwSendCompleteFlags;    // Flags describing how message was sent
  858.     DPN_BUFFER_DESC        *pBuffers;                // Pointer to array of buffers sent, if DirectPlay did not make a copy
  859.     DWORD                dwNumBuffers;            // Number of buffers in previous array
  860. } DPNMSG_SEND_COMPLETE, *PDPNMSG_SEND_COMPLETE;
  861.  
  862. //
  863. // Server info structure for message handler
  864. // (DPN_MSGID_SERVER_INFO)
  865. //
  866. typedef struct    _DPNMSG_SERVER_INFO
  867. {
  868.     DWORD    dwSize;                    // Size of this structure
  869.     DPNID    dpnidServer;            // DPNID of server
  870.     PVOID    pvPlayerContext;        // Player context value
  871. } DPNMSG_SERVER_INFO, *PDPNMSG_SERVER_INFO;
  872.  
  873. //
  874. // Terminated session structure for message handler
  875. // (DPN_MSGID_TERMINATE_SESSION)
  876. //
  877. typedef struct    _DPNMSG_TERMINATE_SESSION
  878. {
  879.     DWORD        dwSize;                // Size of this structure
  880.     HRESULT        hResultCode;        // Reason
  881.     PVOID        pvTerminateData;    // Data passed from Host/Server
  882.     DWORD        dwTerminateDataSize;// Size (in bytes) of pvTerminateData
  883. } DPNMSG_TERMINATE_SESSION, *PDPNMSG_TERMINATE_SESSION;
  884.  
  885.  
  886. //
  887. // Message structures added for DirectX 9
  888. //
  889.  
  890. //
  891. // Create thread info structure for message handler
  892. // (DPN_MSGID_CREATE_THREAD)
  893. //
  894. typedef struct    _DPNMSG_CREATE_THREAD
  895. {
  896.     DWORD    dwSize;                // Size of this structure
  897.     DWORD    dwFlags;            // Flags describing this thread
  898.     DWORD    dwProcessorNum;        // Index of processor to which thread is bound
  899.     PVOID    pvUserContext;        // Thread context value
  900. } DPNMSG_CREATE_THREAD, *PDPNMSG_CREATE_THREAD;
  901.  
  902. //
  903. // Destroy thread info structure for message handler
  904. // (DPN_MSGID_DESTROY_THREAD)
  905. //
  906. typedef struct    _DPNMSG_DESTROY_THREAD
  907. {
  908.     DWORD    dwSize;                // Size of this structure
  909.     DWORD    dwProcessorNum;        // Index of processor to which thread was bound
  910.     PVOID    pvUserContext;        // Thread context value
  911. } DPNMSG_DESTROY_THREAD, *PDPNMSG_DESTROY_THREAD;
  912.  
  913.  
  914. //
  915. // Query-to-resolve-NAT-address structure for message handler
  916. // (DPN_MSGID_NAT_RESOLVER_QUERY)
  917. //
  918. typedef    struct    _DPNMSG_NAT_RESOLVER_QUERY
  919. {
  920.     DWORD                dwSize;                // Size of this structure.
  921.     IDirectPlay8Address    *pAddressSender;    // Address of client that sent the query
  922.     IDirectPlay8Address    *pAddressDevice;    // Address of device on which query was received
  923.     WCHAR                *pwszUserString;    // User specified string, or NULL if none
  924. } DPNMSG_NAT_RESOLVER_QUERY, *PDPNMSG_NAT_RESOLVER_QUERY;
  925.  
  926. /****************************************************************************
  927.  *
  928.  * DirectPlay8 Functions
  929.  *
  930.  ****************************************************************************/
  931.  
  932.  
  933.  
  934. /*
  935.  * This function is no longer supported.  It is recommended that CoCreateInstance be used to create 
  936.  * DirectPlay8 objects.
  937.  *
  938.  * extern HRESULT WINAPI DirectPlay8Create( const CLSID * pcIID, void **ppvInterface, IUnknown *pUnknown );
  939.  * 
  940.  */
  941.  
  942.  
  943. /****************************************************************************
  944.  *
  945.  * DirectPlay8 Application Interfaces
  946.  *
  947.  ****************************************************************************/
  948.  
  949. //
  950. // COM definition for DirectPlay8 Client interface
  951. //
  952. #undef INTERFACE                // External COM Implementation
  953. #define INTERFACE IDirectPlay8Client
  954. DECLARE_INTERFACE_(IDirectPlay8Client,IUnknown)
  955. {
  956.     /*** IUnknown methods ***/
  957.     STDMETHOD(QueryInterface)            (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  958.     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
  959.     STDMETHOD_(ULONG,Release)            (THIS) PURE;
  960.     /*** IDirectPlay8Client methods ***/
  961.     STDMETHOD(Initialize)                (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  962.     STDMETHOD(EnumServiceProviders)        (THIS_ const GUID *const pguidServiceProvider, const GUID *const pguidApplication, DPN_SERVICE_PROVIDER_INFO *const pSPInfoBuffer, PDWORD const pcbEnumData, PDWORD const pcReturned, const DWORD dwFlags) PURE;
  963.     STDMETHOD(EnumHosts)                (THIS_ PDPN_APPLICATION_DESC const pApplicationDesc,IDirectPlay8Address *const pAddrHost,IDirectPlay8Address *const pDeviceInfo,PVOID const pUserEnumData,const DWORD dwUserEnumDataSize,const DWORD dwEnumCount,const DWORD dwRetryInterval,const DWORD dwTimeOut,PVOID const pvUserContext,DPNHANDLE *const pAsyncHandle,const DWORD dwFlags) PURE;
  964.     STDMETHOD(CancelAsyncOperation)        (THIS_ const DPNHANDLE hAsyncHandle, const DWORD dwFlags) PURE;
  965.     STDMETHOD(Connect)                    (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address *const pHostAddr,IDirectPlay8Address *const pDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,const void *const pvUserConnectData,const DWORD dwUserConnectDataSize,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
  966.     STDMETHOD(Send)                        (THIS_ const DPN_BUFFER_DESC *const prgBufferDesc,const DWORD cBufferDesc,const DWORD dwTimeOut,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
  967.     STDMETHOD(GetSendQueueInfo)            (THIS_ DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
  968.     STDMETHOD(GetApplicationDesc)        (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
  969.     STDMETHOD(SetClientInfo)            (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  970.     STDMETHOD(GetServerInfo)            (THIS_ DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  971.     STDMETHOD(GetServerAddress)            (THIS_ IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE;
  972.     STDMETHOD(Close)                    (THIS_ const DWORD dwFlags) PURE;
  973.     STDMETHOD(ReturnBuffer)                (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
  974.     STDMETHOD(GetCaps)                    (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
  975.     STDMETHOD(SetCaps)                    (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
  976.     STDMETHOD(SetSPCaps)                (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
  977.     STDMETHOD(GetSPCaps)                (THIS_ const GUID * const pguidSP,DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
  978.     STDMETHOD(GetConnectionInfo)        (THIS_ DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
  979.     STDMETHOD(RegisterLobby)            (THIS_ const DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
  980. };
  981.  
  982. //
  983. // COM definition for DirectPlay8 Server interface
  984. //
  985. #undef INTERFACE                // External COM Implementation
  986. #define INTERFACE IDirectPlay8Server
  987. DECLARE_INTERFACE_(IDirectPlay8Server,IUnknown)
  988. {
  989.     /*** IUnknown methods ***/
  990.     STDMETHOD(QueryInterface)            (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  991.     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
  992.     STDMETHOD_(ULONG,Release)            (THIS) PURE;
  993.     /*** IDirectPlay8Server methods ***/
  994.     STDMETHOD(Initialize)                (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  995.     STDMETHOD(EnumServiceProviders)        (THIS_ const GUID *const pguidServiceProvider,const GUID *const pguidApplication,DPN_SERVICE_PROVIDER_INFO *const pSPInfoBuffer,PDWORD const pcbEnumData,PDWORD const pcReturned,const DWORD dwFlags) PURE;
  996.     STDMETHOD(CancelAsyncOperation)        (THIS_ const DPNHANDLE hAsyncHandle,const DWORD dwFlags) PURE;
  997.     STDMETHOD(GetSendQueueInfo)            (THIS_ const DPNID dpnid,DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
  998.     STDMETHOD(GetApplicationDesc)        (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
  999.     STDMETHOD(SetServerInfo)            (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1000.     STDMETHOD(GetClientInfo)            (THIS_ const DPNID dpnid,DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  1001.     STDMETHOD(GetClientAddress)            (THIS_ const DPNID dpnid,IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE;
  1002.     STDMETHOD(GetLocalHostAddresses)    (THIS_ IDirectPlay8Address **const prgpAddress,DWORD *const pcAddress,const DWORD dwFlags) PURE;
  1003.     STDMETHOD(SetApplicationDesc)        (THIS_ const DPN_APPLICATION_DESC *const pad, const DWORD dwFlags) PURE;
  1004.     STDMETHOD(Host)                        (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address **const prgpDeviceInfo,const DWORD cDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,void *const pvPlayerContext,const DWORD dwFlags) PURE;
  1005.     STDMETHOD(SendTo)                    (THIS_ const DPNID dpnid,const DPN_BUFFER_DESC *const prgBufferDesc,const DWORD cBufferDesc,const DWORD dwTimeOut,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
  1006.     STDMETHOD(CreateGroup)                (THIS_ const DPN_GROUP_INFO *const pdpnGroupInfo,void *const pvGroupContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
  1007.     STDMETHOD(DestroyGroup)                (THIS_ const DPNID idGroup, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1008.     STDMETHOD(AddPlayerToGroup)            (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1009.     STDMETHOD(RemovePlayerFromGroup)    (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1010.     STDMETHOD(SetGroupInfo)                (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1011.     STDMETHOD(GetGroupInfo)                (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  1012.     STDMETHOD(EnumPlayersAndGroups)        (THIS_ DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  1013.     STDMETHOD(EnumGroupMembers)            (THIS_ const DPNID dpnid, DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  1014.     STDMETHOD(Close)                    (THIS_ const DWORD dwFlags) PURE;
  1015.     STDMETHOD(DestroyClient)            (THIS_ const DPNID dpnidClient, const void *const pvDestroyData, const DWORD dwDestroyDataSize, const DWORD dwFlags) PURE;
  1016.     STDMETHOD(ReturnBuffer)                (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
  1017.     STDMETHOD(GetPlayerContext)            (THIS_ const DPNID dpnid,PVOID *const ppvPlayerContext,const DWORD dwFlags) PURE;
  1018.     STDMETHOD(GetGroupContext)            (THIS_ const DPNID dpnid,PVOID *const ppvGroupContext,const DWORD dwFlags) PURE;
  1019.     STDMETHOD(GetCaps)                    (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
  1020.     STDMETHOD(SetCaps)                    (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
  1021.     STDMETHOD(SetSPCaps)                (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
  1022.     STDMETHOD(GetSPCaps)                (THIS_ const GUID * const pguidSP, DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
  1023.     STDMETHOD(GetConnectionInfo)        (THIS_ const DPNID dpnid, DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
  1024.     STDMETHOD(RegisterLobby)            (THIS_ const DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
  1025. };
  1026.  
  1027. //
  1028. // COM definition for DirectPlay8 Peer interface
  1029. //
  1030. #undef INTERFACE                // External COM Implementation
  1031. #define INTERFACE IDirectPlay8Peer
  1032. DECLARE_INTERFACE_(IDirectPlay8Peer,IUnknown)
  1033. {
  1034.     /*** IUnknown methods ***/
  1035.     STDMETHOD(QueryInterface)            (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  1036.     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
  1037.     STDMETHOD_(ULONG,Release)            (THIS) PURE;
  1038.     /*** IDirectPlay8Peer methods ***/
  1039.     STDMETHOD(Initialize)                (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  1040.     STDMETHOD(EnumServiceProviders)        (THIS_ const GUID *const pguidServiceProvider, const GUID *const pguidApplication, DPN_SERVICE_PROVIDER_INFO *const pSPInfoBuffer, DWORD *const pcbEnumData, DWORD *const pcReturned, const DWORD dwFlags) PURE;
  1041.     STDMETHOD(CancelAsyncOperation)        (THIS_ const DPNHANDLE hAsyncHandle, const DWORD dwFlags) PURE;
  1042.     STDMETHOD(Connect)                    (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address *const pHostAddr,IDirectPlay8Address *const pDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,const void *const pvUserConnectData,const DWORD dwUserConnectDataSize,void *const pvPlayerContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
  1043.     STDMETHOD(SendTo)                    (THIS_ const DPNID dpnid,const DPN_BUFFER_DESC *const prgBufferDesc,const DWORD cBufferDesc,const DWORD dwTimeOut,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
  1044.     STDMETHOD(GetSendQueueInfo)            (THIS_ const DPNID dpnid, DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
  1045.     STDMETHOD(Host)                        (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address **const prgpDeviceInfo,const DWORD cDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,void *const pvPlayerContext,const DWORD dwFlags) PURE;
  1046.     STDMETHOD(GetApplicationDesc)        (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
  1047.     STDMETHOD(SetApplicationDesc)        (THIS_ const DPN_APPLICATION_DESC *const pad, const DWORD dwFlags) PURE;
  1048.     STDMETHOD(CreateGroup)                (THIS_ const DPN_GROUP_INFO *const pdpnGroupInfo,void *const pvGroupContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
  1049.     STDMETHOD(DestroyGroup)                (THIS_ const DPNID idGroup, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1050.     STDMETHOD(AddPlayerToGroup)            (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1051.     STDMETHOD(RemovePlayerFromGroup)    (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1052.     STDMETHOD(SetGroupInfo)                (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1053.     STDMETHOD(GetGroupInfo)                (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  1054.     STDMETHOD(EnumPlayersAndGroups)        (THIS_ DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  1055.     STDMETHOD(EnumGroupMembers)            (THIS_ const DPNID dpnid, DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  1056.     STDMETHOD(SetPeerInfo)                (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1057.     STDMETHOD(GetPeerInfo)                (THIS_ const DPNID dpnid,DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  1058.     STDMETHOD(GetPeerAddress)            (THIS_ const DPNID dpnid,IDirectPlay8Address **const ppAddress,const DWORD dwFlags) PURE;
  1059.     STDMETHOD(GetLocalHostAddresses)    (THIS_ IDirectPlay8Address **const prgpAddress,DWORD *const pcAddress,const DWORD dwFlags) PURE;
  1060.     STDMETHOD(Close)                    (THIS_ const DWORD dwFlags) PURE;
  1061.     STDMETHOD(EnumHosts)                (THIS_ PDPN_APPLICATION_DESC const pApplicationDesc,IDirectPlay8Address *const pAddrHost,IDirectPlay8Address *const pDeviceInfo,PVOID const pUserEnumData,const DWORD dwUserEnumDataSize,const DWORD dwEnumCount,const DWORD dwRetryInterval,const DWORD dwTimeOut,PVOID const pvUserContext,DPNHANDLE *const pAsyncHandle,const DWORD dwFlags) PURE;
  1062.     STDMETHOD(DestroyPeer)                (THIS_ const DPNID dpnidClient, const void *const pvDestroyData, const DWORD dwDestroyDataSize, const DWORD dwFlags) PURE;
  1063.     STDMETHOD(ReturnBuffer)                (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
  1064.     STDMETHOD(GetPlayerContext)            (THIS_ const DPNID dpnid,PVOID *const ppvPlayerContext,const DWORD dwFlags) PURE;
  1065.     STDMETHOD(GetGroupContext)            (THIS_ const DPNID dpnid,PVOID *const ppvGroupContext,const DWORD dwFlags) PURE;
  1066.     STDMETHOD(GetCaps)                    (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
  1067.     STDMETHOD(SetCaps)                    (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
  1068.     STDMETHOD(SetSPCaps)                (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
  1069.     STDMETHOD(GetSPCaps)                (THIS_ const GUID * const pguidSP, DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
  1070.     STDMETHOD(GetConnectionInfo)        (THIS_ const DPNID dpnid, DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
  1071.     STDMETHOD(RegisterLobby)            (THIS_ const DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
  1072.     STDMETHOD(TerminateSession)            (THIS_ void *const pvTerminateData,const DWORD dwTerminateDataSize,const DWORD dwFlags) PURE;
  1073. };
  1074.  
  1075.  
  1076.  
  1077. //
  1078. // COM definition for DirectPlay8 Thread Pool interface
  1079. //
  1080. #undef INTERFACE                // External COM Implementation
  1081. #define INTERFACE IDirectPlay8ThreadPool
  1082. DECLARE_INTERFACE_(IDirectPlay8ThreadPool,IUnknown)
  1083. {
  1084.     /*** IUnknown methods ***/
  1085.     STDMETHOD(QueryInterface)            (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  1086.     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
  1087.     STDMETHOD_(ULONG,Release)            (THIS) PURE;
  1088.     /*** IDirectPlay8ThreadPool methods ***/
  1089.     STDMETHOD(Initialize)                (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  1090.     STDMETHOD(Close)                    (THIS_ const DWORD dwFlags) PURE;
  1091.     STDMETHOD(GetThreadCount)            (THIS_ const DWORD dwProcessorNum, DWORD *const pdwNumThreads, const DWORD dwFlags) PURE;
  1092.     STDMETHOD(SetThreadCount)            (THIS_ const DWORD dwProcessorNum, const DWORD dwNumThreads, const DWORD dwFlags) PURE;
  1093.     STDMETHOD(DoWork)                    (THIS_ const DWORD dwAllowedTimeSlice, const DWORD dwFlags) PURE;
  1094. };
  1095.  
  1096.  
  1097. //
  1098. // COM definition for DirectPlay8 NAT Resolver interface
  1099. //
  1100. #undef INTERFACE                // External COM Implementation
  1101. #define INTERFACE IDirectPlay8NATResolver
  1102. DECLARE_INTERFACE_(IDirectPlay8NATResolver,IUnknown)
  1103. {
  1104.     /*** IUnknown methods ***/
  1105.     STDMETHOD(QueryInterface)            (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  1106.     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
  1107.     STDMETHOD_(ULONG,Release)            (THIS) PURE;
  1108.     /*** IDirectPlay8NATResolver methods ***/
  1109.     STDMETHOD(Initialize)                (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  1110.     STDMETHOD(Start)                    (THIS_ IDirectPlay8Address **const ppDevices, const DWORD dwNumDevices, const DWORD dwFlags) PURE;
  1111.     STDMETHOD(Close)                    (THIS_ const DWORD dwFlags) PURE;
  1112.     STDMETHOD(EnumDevices)                (THIS_ DPN_SERVICE_PROVIDER_INFO *const pSPInfoBuffer, PDWORD const pdwBufferSize, PDWORD const pdwNumDevices, const DWORD dwFlags) PURE;
  1113.     STDMETHOD(GetAddresses)                (THIS_ IDirectPlay8Address **const ppAddresses, DWORD *const pdwNumAddresses, const DWORD dwFlags) PURE;
  1114. };
  1115.  
  1116.  
  1117. /****************************************************************************
  1118.  *
  1119.  * IDirectPlay8 application interface macros
  1120.  *
  1121.  ****************************************************************************/
  1122.  
  1123. #if !defined(__cplusplus) || defined(CINTERFACE)
  1124.  
  1125. #define IDirectPlay8Client_QueryInterface(p,a,b)                    (p)->lpVtbl->QueryInterface(p,a,b)
  1126. #define IDirectPlay8Client_AddRef(p)                                (p)->lpVtbl->AddRef(p)
  1127. #define IDirectPlay8Client_Release(p)                                (p)->lpVtbl->Release(p)
  1128. #define IDirectPlay8Client_Initialize(p,a,b,c)                        (p)->lpVtbl->Initialize(p,a,b,c)
  1129. #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f)        (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  1130. #define IDirectPlay8Client_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k)        (p)->lpVtbl->EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k)
  1131. #define IDirectPlay8Client_CancelAsyncOperation(p,a,b)                (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  1132. #define IDirectPlay8Client_Connect(p,a,b,c,d,e,f,g,h,i,j)            (p)->lpVtbl->Connect(p,a,b,c,d,e,f,g,h,i,j)
  1133. #define IDirectPlay8Client_Send(p,a,b,c,d,e,f)                        (p)->lpVtbl->Send(p,a,b,c,d,e,f)
  1134. #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c)                (p)->lpVtbl->GetSendQueueInfo(p,a,b,c)
  1135. #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c)                (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  1136. #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d)                    (p)->lpVtbl->SetClientInfo(p,a,b,c,d)
  1137. #define IDirectPlay8Client_GetServerInfo(p,a,b,c)                    (p)->lpVtbl->GetServerInfo(p,a,b,c)
  1138. #define IDirectPlay8Client_GetServerAddress(p,a,b)                    (p)->lpVtbl->GetServerAddress(p,a,b)
  1139. #define IDirectPlay8Client_Close(p,a)                                (p)->lpVtbl->Close(p,a)
  1140. #define IDirectPlay8Client_ReturnBuffer(p,a,b)                        (p)->lpVtbl->ReturnBuffer(p,a,b)
  1141. #define IDirectPlay8Client_GetCaps(p,a,b)                            (p)->lpVtbl->GetCaps(p,a,b)
  1142. #define IDirectPlay8Client_SetCaps(p,a,b)                            (p)->lpVtbl->SetCaps(p,a,b)
  1143. #define IDirectPlay8Client_SetSPCaps(p,a,b,c)                        (p)->lpVtbl->SetSPCaps(p,a,b,c)
  1144. #define IDirectPlay8Client_GetSPCaps(p,a,b,c)                        (p)->lpVtbl->GetSPCaps(p,a,b,c)
  1145. #define IDirectPlay8Client_GetConnectionInfo(p,a,b)                    (p)->lpVtbl->GetConnectionInfo(p,a,b)
  1146. #define IDirectPlay8Client_RegisterLobby(p,a,b,c)                    (p)->lpVtbl->RegisterLobby(p,a,b,c)
  1147.  
  1148. #define IDirectPlay8Server_QueryInterface(p,a,b)                    (p)->lpVtbl->QueryInterface(p,a,b)
  1149. #define IDirectPlay8Server_AddRef(p)                                (p)->lpVtbl->AddRef(p)
  1150. #define IDirectPlay8Server_Release(p)                                (p)->lpVtbl->Release(p)
  1151. #define IDirectPlay8Server_Initialize(p,a,b,c)                        (p)->lpVtbl->Initialize(p,a,b,c)
  1152. #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f)        (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  1153. #define IDirectPlay8Server_CancelAsyncOperation(p,a,b)                (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  1154. #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d)                (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
  1155. #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c)                (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  1156. #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d)                    (p)->lpVtbl->SetServerInfo(p,a,b,c,d)
  1157. #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d)                    (p)->lpVtbl->GetClientInfo(p,a,b,c,d)
  1158. #define IDirectPlay8Server_GetClientAddress(p,a,b,c)                (p)->lpVtbl->GetClientAddress(p,a,b,c)
  1159. #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c)            (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
  1160. #define IDirectPlay8Server_SetApplicationDesc(p,a,b)                (p)->lpVtbl->SetApplicationDesc(p,a,b)
  1161. #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g)                    (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
  1162. #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g)                    (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
  1163. #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e)                    (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
  1164. #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d)                    (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
  1165. #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e)            (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
  1166. #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e)        (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
  1167. #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e)                (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
  1168. #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d)                    (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
  1169. #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c)            (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
  1170. #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d)                (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
  1171. #define IDirectPlay8Server_Close(p,a)                                (p)->lpVtbl->Close(p,a)
  1172. #define IDirectPlay8Server_DestroyClient(p,a,b,c,d)                    (p)->lpVtbl->DestroyClient(p,a,b,c,d)
  1173. #define IDirectPlay8Server_ReturnBuffer(p,a,b)                        (p)->lpVtbl->ReturnBuffer(p,a,b)
  1174. #define IDirectPlay8Server_GetPlayerContext(p,a,b,c)                (p)->lpVtbl->GetPlayerContext(p,a,b,c)
  1175. #define IDirectPlay8Server_GetGroupContext(p,a,b,c)                    (p)->lpVtbl->GetGroupContext(p,a,b,c)
  1176. #define IDirectPlay8Server_GetCaps(p,a,b)                            (p)->lpVtbl->GetCaps(p,a,b)
  1177. #define IDirectPlay8Server_SetCaps(p,a,b)                            (p)->lpVtbl->SetCaps(p,a,b)
  1178. #define IDirectPlay8Server_SetSPCaps(p,a,b,c)                        (p)->lpVtbl->SetSPCaps(p,a,b,c)
  1179. #define IDirectPlay8Server_GetSPCaps(p,a,b,c)                        (p)->lpVtbl->GetSPCaps(p,a,b,c)
  1180. #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c)                (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
  1181. #define IDirectPlay8Server_RegisterLobby(p,a,b,c)                    (p)->lpVtbl->RegisterLobby(p,a,b,c)
  1182.  
  1183. #define IDirectPlay8Peer_QueryInterface(p,a,b)                        (p)->lpVtbl->QueryInterface(p,a,b)
  1184. #define IDirectPlay8Peer_AddRef(p)                                    (p)->lpVtbl->AddRef(p)
  1185. #define IDirectPlay8Peer_Release(p)                                    (p)->lpVtbl->Release(p)
  1186. #define IDirectPlay8Peer_Initialize(p,a,b,c)                        (p)->lpVtbl->Initialize(p,a,b,c)
  1187. #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f)        (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  1188. #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b)                (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  1189. #define IDirectPlay8Peer_Connect(p,a,b,c,d,e,f,g,h,i,j,k)            (p)->lpVtbl->Connect(p,a,b,c,d,e,f,g,h,i,j,k)
  1190. #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g)                    (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
  1191. #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d)                (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
  1192. #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g)                        (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
  1193. #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c)                (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  1194. #define IDirectPlay8Peer_SetApplicationDesc(p,a,b)                    (p)->lpVtbl->SetApplicationDesc(p,a,b)
  1195. #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e)                    (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
  1196. #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d)                    (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
  1197. #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e)                (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
  1198. #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e)            (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
  1199. #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e)                    (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
  1200. #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d)                    (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
  1201. #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c)                (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
  1202. #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d)                (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
  1203. #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d)                        (p)->lpVtbl->SetPeerInfo(p,a,b,c,d)
  1204. #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d)                        (p)->lpVtbl->GetPeerInfo(p,a,b,c,d)
  1205. #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c)                    (p)->lpVtbl->GetPeerAddress(p,a,b,c)
  1206. #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c)                (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
  1207. #define IDirectPlay8Peer_Close(p,a)                                    (p)->lpVtbl->Close(p,a)
  1208. #define IDirectPlay8Peer_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k)            (p)->lpVtbl->EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k)
  1209. #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d)                        (p)->lpVtbl->DestroyPeer(p,a,b,c,d)
  1210. #define IDirectPlay8Peer_ReturnBuffer(p,a,b)                        (p)->lpVtbl->ReturnBuffer(p,a,b)
  1211. #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c)                    (p)->lpVtbl->GetPlayerContext(p,a,b,c)
  1212. #define IDirectPlay8Peer_GetGroupContext(p,a,b,c)                    (p)->lpVtbl->GetGroupContext(p,a,b,c)
  1213. #define IDirectPlay8Peer_GetCaps(p,a,b)                                (p)->lpVtbl->GetCaps(p,a,b)
  1214. #define IDirectPlay8Peer_SetCaps(p,a,b)                                (p)->lpVtbl->SetCaps(p,a,b)
  1215. #define IDirectPlay8Peer_SetSPCaps(p,a,b,c)                            (p)->lpVtbl->SetSPCaps(p,a,b,c)
  1216. #define IDirectPlay8Peer_GetSPCaps(p,a,b,c)                            (p)->lpVtbl->GetSPCaps(p,a,b,c)
  1217. #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c)                    (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
  1218. #define IDirectPlay8Peer_RegisterLobby(p,a,b,c)                        (p)->lpVtbl->RegisterLobby(p,a,b,c)
  1219. #define IDirectPlay8Peer_TerminateSession(p,a,b,c)                    (p)->lpVtbl->TerminateSession(p,a,b,c)
  1220.  
  1221. #define IDirectPlay8ThreadPool_QueryInterface(p,a,b)                (p)->lpVtbl->QueryInterface(p,a,b)
  1222. #define IDirectPlay8ThreadPool_AddRef(p)                            (p)->lpVtbl->AddRef(p)
  1223. #define IDirectPlay8ThreadPool_Release(p)                            (p)->lpVtbl->Release(p)
  1224. #define IDirectPlay8ThreadPool_Initialize(p,a,b,c)                    (p)->lpVtbl->Initialize(p,a,b,c)
  1225. #define IDirectPlay8ThreadPool_Close(p,a)                            (p)->lpVtbl->Close(p,a)
  1226. #define IDirectPlay8ThreadPool_GetThreadCount(p,a,b,c)                (p)->lpVtbl->GetThreadCount(p,a,b,c)
  1227. #define IDirectPlay8ThreadPool_SetThreadCount(p,a,b,c)                (p)->lpVtbl->SetThreadCount(p,a,b,c)
  1228. #define IDirectPlay8ThreadPool_DoWork(p,a,b)                        (p)->lpVtbl->DoWork(p,a,b)
  1229.  
  1230. #define IDirectPlay8NATResolver_QueryInterface(p,a,b)                (p)->lpVtbl->QueryInterface(p,a,b)
  1231. #define IDirectPlay8NATResolver_AddRef(p)                            (p)->lpVtbl->AddRef(p)
  1232. #define IDirectPlay8NATResolver_Release(p)                            (p)->lpVtbl->Release(p)
  1233. #define IDirectPlay8NATResolver_Initialize(p,a,b,c)                    (p)->lpVtbl->Initialize(p,a,b,c)
  1234. #define IDirectPlay8NATResolver_Start(p,a,b,c)                        (p)->lpVtbl->Start(p,a,b,c)
  1235. #define IDirectPlay8NATResolver_Close(p,a)                            (p)->lpVtbl->Close(p,a)
  1236. #define IDirectPlay8NATResolver_EnumDevices(p,a,b,c,d)                (p)->lpVtbl->EnumDevices(p,a,b,c,d)
  1237. #define IDirectPlay8NATResolver_GetAddresses(p,a,b,c)                (p)->lpVtbl->GetAddresses(p,a,b,c)
  1238.  
  1239. #else /* C++ */
  1240.  
  1241. #define IDirectPlay8Client_QueryInterface(p,a,b)                    (p)->QueryInterface(a,b)
  1242. #define IDirectPlay8Client_AddRef(p)                                (p)->AddRef()
  1243. #define IDirectPlay8Client_Release(p)                                (p)->Release()
  1244. #define IDirectPlay8Client_Initialize(p,a,b,c)                        (p)->Initialize(a,b,c)
  1245. #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f)        (p)->EnumServiceProviders(a,b,c,d,e,f)
  1246. #define IDirectPlay8Client_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k)        (p)->EnumHosts(a,b,c,d,e,f,g,h,i,j,k)
  1247. #define IDirectPlay8Client_CancelAsyncOperation(p,a,b)                (p)->CancelAsyncOperation(a,b)
  1248. #define IDirectPlay8Client_Connect(p,a,b,c,d,e,f,g,h,i,j)            (p)->Connect(a,b,c,d,e,f,g,h,i,j)
  1249. #define IDirectPlay8Client_Send(p,a,b,c,d,e,f)                        (p)->Send(a,b,c,d,e,f)
  1250. #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c)                (p)->GetSendQueueInfo(a,b,c)
  1251. #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c)                (p)->GetApplicationDesc(a,b,c)
  1252. #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d)                    (p)->SetClientInfo(a,b,c,d)
  1253. #define IDirectPlay8Client_GetServerInfo(p,a,b,c)                    (p)->GetServerInfo(a,b,c)
  1254. #define IDirectPlay8Client_GetServerAddress(p,a,b)                    (p)->GetServerAddress(a,b)
  1255. #define IDirectPlay8Client_Close(p,a)                                (p)->Close(a)
  1256. #define IDirectPlay8Client_ReturnBuffer(p,a,b)                        (p)->ReturnBuffer(a,b)
  1257. #define IDirectPlay8Client_GetCaps(p,a,b)                            (p)->GetCaps(a,b)
  1258. #define IDirectPlay8Client_SetCaps(p,a,b)                            (p)->SetCaps(a,b)
  1259. #define IDirectPlay8Client_SetSPCaps(p,a,b,c)                        (p)->SetSPCaps(a,b,c)
  1260. #define IDirectPlay8Client_GetSPCaps(p,a,b,c)                        (p)->GetSPCaps(a,b,c)
  1261. #define IDirectPlay8Client_GetConnectionInfo(p,a,b)                    (p)->GetConnectionInfo(a,b)
  1262. #define IDirectPlay8Client_RegisterLobby(p,a,b,c)                    (p)->RegisterLobby(a,b,c)
  1263.  
  1264. #define IDirectPlay8Server_QueryInterface(p,a,b)                    (p)->QueryInterface(a,b)
  1265. #define IDirectPlay8Server_AddRef(p)                                (p)->AddRef()
  1266. #define IDirectPlay8Server_Release(p)                                (p)->Release()
  1267. #define IDirectPlay8Server_Initialize(p,a,b,c)                        (p)->Initialize(a,b,c)
  1268. #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f)        (p)->EnumServiceProviders(a,b,c,d,e,f)
  1269. #define IDirectPlay8Server_CancelAsyncOperation(p,a,b)                (p)->CancelAsyncOperation(a,b)
  1270. #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d)                (p)->GetSendQueueInfo(a,b,c,d)
  1271. #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c)                (p)->GetApplicationDesc(a,b,c)
  1272. #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d)                    (p)->SetServerInfo(a,b,c,d)
  1273. #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d)                    (p)->GetClientInfo(a,b,c,d)
  1274. #define IDirectPlay8Server_GetClientAddress(p,a,b,c)                (p)->GetClientAddress(a,b,c)
  1275. #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c)            (p)->GetLocalHostAddresses(a,b,c)
  1276. #define IDirectPlay8Server_SetApplicationDesc(p,a,b)                (p)->SetApplicationDesc(a,b)
  1277. #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g)                    (p)->Host(a,b,c,d,e,f,g)
  1278. #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g)                    (p)->SendTo(a,b,c,d,e,f,g)
  1279. #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e)                    (p)->CreateGroup(a,b,c,d,e)
  1280. #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d)                    (p)->DestroyGroup(a,b,c,d)
  1281. #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e)            (p)->AddPlayerToGroup(a,b,c,d,e)
  1282. #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e)        (p)->RemovePlayerFromGroup(a,b,c,d,e)
  1283. #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e)                (p)->SetGroupInfo(a,b,c,d,e)
  1284. #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d)                    (p)->GetGroupInfo(a,b,c,d)
  1285. #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c)            (p)->EnumPlayersAndGroups(a,b,c)
  1286. #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d)                (p)->EnumGroupMembers(a,b,c,d)
  1287. #define IDirectPlay8Server_Close(p,a)                                (p)->Close(a)
  1288. #define IDirectPlay8Server_DestroyClient(p,a,b,c,d)                    (p)->DestroyClient(a,b,c,d)
  1289. #define IDirectPlay8Server_ReturnBuffer(p,a,b)                        (p)->ReturnBuffer(a,b)
  1290. #define IDirectPlay8Server_GetPlayerContext(p,a,b,c)                (p)->GetPlayerContext(a,b,c)
  1291. #define IDirectPlay8Server_GetGroupContext(p,a,b,c)                    (p)->GetGroupContext(a,b,c)
  1292. #define IDirectPlay8Server_GetCaps(p,a,b)                            (p)->GetCaps(a,b)
  1293. #define IDirectPlay8Server_SetCaps(p,a,b)                            (p)->SetCaps(a,b)
  1294. #define IDirectPlay8Server_SetSPCaps(p,a,b,c)                        (p)->SetSPCaps(a,b,c)
  1295. #define IDirectPlay8Server_GetSPCaps(p,a,b,c)                        (p)->GetSPCaps(a,b,c)
  1296. #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c)                (p)->GetConnectionInfo(a,b,c)
  1297. #define IDirectPlay8Server_RegisterLobby(p,a,b,c)                    (p)->RegisterLobby(a,b,c)
  1298.  
  1299. #define IDirectPlay8Peer_QueryInterface(p,a,b)                        (p)->QueryInterface(a,b)
  1300. #define IDirectPlay8Peer_AddRef(p)                                    (p)->AddRef()
  1301. #define IDirectPlay8Peer_Release(p)                                    (p)->Release()
  1302. #define IDirectPlay8Peer_Initialize(p,a,b,c)                        (p)->Initialize(a,b,c)
  1303. #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f)        (p)->EnumServiceProviders(a,b,c,d,e,f)
  1304. #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b)                (p)->CancelAsyncOperation(a,b)
  1305. #define IDirectPlay8Peer_Connect(p,a,b,c,d,e,f,g,h,i,j,k)            (p)->Connect(a,b,c,d,e,f,g,h,i,j,k)
  1306. #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g)                    (p)->SendTo(a,b,c,d,e,f,g)
  1307. #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d)                (p)->GetSendQueueInfo(a,b,c,d)
  1308. #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g)                        (p)->Host(a,b,c,d,e,f,g)
  1309. #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c)                (p)->GetApplicationDesc(a,b,c)
  1310. #define IDirectPlay8Peer_SetApplicationDesc(p,a,b)                    (p)->SetApplicationDesc(a,b)
  1311. #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e)                    (p)->CreateGroup(a,b,c,d,e)
  1312. #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d)                    (p)->DestroyGroup(a,b,c,d)
  1313. #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e)                (p)->AddPlayerToGroup(a,b,c,d,e)
  1314. #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e)            (p)->RemovePlayerFromGroup(a,b,c,d,e)
  1315. #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e)                    (p)->SetGroupInfo(a,b,c,d,e)
  1316. #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d)                    (p)->GetGroupInfo(a,b,c,d)
  1317. #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c)                (p)->EnumPlayersAndGroups(a,b,c)
  1318. #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d)                (p)->EnumGroupMembers(a,b,c,d)
  1319. #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d)                        (p)->SetPeerInfo(a,b,c,d)
  1320. #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d)                        (p)->GetPeerInfo(a,b,c,d)
  1321. #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c)                    (p)->GetPeerAddress(a,b,c)
  1322. #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c)                (p)->GetLocalHostAddresses(a,b,c)
  1323. #define IDirectPlay8Peer_Close(p,a)                                    (p)->Close(a)
  1324. #define IDirectPlay8Peer_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k)            (p)->EnumHosts(a,b,c,d,e,f,g,h,i,j,k)
  1325. #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d)                        (p)->DestroyPeer(a,b,c,d)
  1326. #define IDirectPlay8Peer_ReturnBuffer(p,a,b)                        (p)->ReturnBuffer(a,b)
  1327. #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c)                    (p)->GetPlayerContext(a,b,c)
  1328. #define IDirectPlay8Peer_GetGroupContext(p,a,b,c)                    (p)->GetGroupContext(a,b,c)
  1329. #define IDirectPlay8Peer_GetCaps(p,a,b)                                (p)->GetCaps(a,b)
  1330. #define IDirectPlay8Peer_SetCaps(p,a,b)                                (p)->SetCaps(a,b)
  1331. #define IDirectPlay8Peer_SetSPCaps(p,a,b,c)                            (p)->SetSPCaps(a,b,c)
  1332. #define IDirectPlay8Peer_GetSPCaps(p,a,b,c)                            (p)->GetSPCaps(a,b,c)
  1333. #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c)                    (p)->GetConnectionInfo(a,b,c)
  1334. #define IDirectPlay8Peer_RegisterLobby(p,a,b,c)                        (p)->RegisterLobby(a,b,c)
  1335. #define IDirectPlay8Peer_TerminateSession(p,a,b,c)                    (p)->TerminateSession(a,b,c)
  1336.  
  1337. #define IDirectPlay8ThreadPool_QueryInterface(p,a,b)                (p)->QueryInterface(a,b)
  1338. #define IDirectPlay8ThreadPool_AddRef(p)                            (p)->AddRef()
  1339. #define IDirectPlay8ThreadPool_Release(p)                            (p)->Release()
  1340. #define IDirectPlay8ThreadPool_Initialize(p,a,b,c)                    (p)->Initialize(a,b,c)
  1341. #define IDirectPlay8ThreadPool_Close(p,a)                            (p)->Close(a)
  1342. #define IDirectPlay8ThreadPool_GetThreadCount(p,a,b,c)                (p)->GetThreadCount(a,b,c)
  1343. #define IDirectPlay8ThreadPool_SetThreadCount(p,a,b,c)                (p)->SetThreadCount(a,b,c)
  1344. #define IDirectPlay8ThreadPool_DoWork(p,a,b)                        (p)->DoWork(a,b)
  1345.  
  1346. #define IDirectPlay8NATResolver_QueryInterface(p,a,b)                (p)->QueryInterface(a,b)
  1347. #define IDirectPlay8NATResolver_AddRef(p)                            (p)->AddRef()
  1348. #define IDirectPlay8NATResolver_Release(p)                            (p)->Release()
  1349. #define IDirectPlay8NATResolver_Initialize(p,a,b,c)                    (p)->Initialize(a,b,c)
  1350. #define IDirectPlay8NATResolver_Start(p,a,b,c)                        (p)->Start(a,b,c)
  1351. #define IDirectPlay8NATResolver_Close(p,a)                            (p)->Close(a)
  1352. #define IDirectPlay8NATResolver_EnumDevices(p,a,b,c,d)                (p)->EnumDevices(a,b,c,d)
  1353. #define IDirectPlay8NATResolver_GetAddresses(p,a,b,c)                (p)->GetAddresses(a,b,c)
  1354.  
  1355. #endif
  1356.  
  1357.  
  1358.  
  1359. /****************************************************************************
  1360.  *
  1361.  * DIRECTPLAY8 ERRORS
  1362.  *
  1363.  * Errors are represented by negative values and cannot be combined.
  1364.  *
  1365.  ****************************************************************************/
  1366.  
  1367. #define _DPN_FACILITY_CODE                0x015
  1368. #define _DPNHRESULT_BASE                0x8000
  1369. #define MAKE_DPNHRESULT( code )            MAKE_HRESULT( 1, _DPN_FACILITY_CODE, ( code + _DPNHRESULT_BASE ) )
  1370.  
  1371. #define DPN_OK                            S_OK
  1372.  
  1373. #define DPNSUCCESS_EQUAL                MAKE_HRESULT( 0, _DPN_FACILITY_CODE, ( 0x5 + _DPNHRESULT_BASE ) )
  1374. #define DPNSUCCESS_NOPLAYERSINGROUP        MAKE_HRESULT( 0, _DPN_FACILITY_CODE, ( 0x8 + _DPNHRESULT_BASE ) )    // added for DirectX 9
  1375. #define DPNSUCCESS_NOTEQUAL                MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0A + _DPNHRESULT_BASE ) )
  1376. #define DPNSUCCESS_PENDING                MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0e + _DPNHRESULT_BASE ) )
  1377.  
  1378. #define DPNERR_ABORTED                    MAKE_DPNHRESULT(  0x30 )
  1379. #define DPNERR_ADDRESSING                MAKE_DPNHRESULT(  0x40 )
  1380. #define DPNERR_ALREADYCLOSING            MAKE_DPNHRESULT(  0x50 )
  1381. #define DPNERR_ALREADYCONNECTED            MAKE_DPNHRESULT(  0x60 )
  1382. #define DPNERR_ALREADYDISCONNECTING        MAKE_DPNHRESULT(  0x70 )
  1383. #define DPNERR_ALREADYINITIALIZED        MAKE_DPNHRESULT(  0x80 )
  1384. #define DPNERR_ALREADYREGISTERED        MAKE_DPNHRESULT(  0x90 )
  1385. #define DPNERR_BUFFERTOOSMALL            MAKE_DPNHRESULT( 0x100 )
  1386. #define DPNERR_CANNOTCANCEL                MAKE_DPNHRESULT( 0x110 )
  1387. #define DPNERR_CANTCREATEGROUP            MAKE_DPNHRESULT( 0x120 )
  1388. #define DPNERR_CANTCREATEPLAYER            MAKE_DPNHRESULT( 0x130 )
  1389. #define DPNERR_CANTLAUNCHAPPLICATION    MAKE_DPNHRESULT( 0x140 )
  1390. #define DPNERR_CONNECTING                MAKE_DPNHRESULT( 0x150 )
  1391. #define DPNERR_CONNECTIONLOST            MAKE_DPNHRESULT( 0x160 )
  1392. #define DPNERR_CONVERSION                MAKE_DPNHRESULT( 0x170 )
  1393. #define DPNERR_DATATOOLARGE                MAKE_DPNHRESULT( 0x175 )
  1394. #define DPNERR_DOESNOTEXIST                MAKE_DPNHRESULT( 0x180 )
  1395. #define DPNERR_DPNSVRNOTAVAILABLE        MAKE_DPNHRESULT( 0x185 )
  1396. #define DPNERR_DUPLICATECOMMAND            MAKE_DPNHRESULT( 0x190 )
  1397. #define DPNERR_ENDPOINTNOTRECEIVING        MAKE_DPNHRESULT( 0x200 )
  1398. #define DPNERR_ENUMQUERYTOOLARGE        MAKE_DPNHRESULT( 0x210 )
  1399. #define DPNERR_ENUMRESPONSETOOLARGE        MAKE_DPNHRESULT( 0x220 )
  1400. #define DPNERR_EXCEPTION                MAKE_DPNHRESULT( 0x230 )
  1401. #define DPNERR_GENERIC                    E_FAIL
  1402. #define DPNERR_GROUPNOTEMPTY            MAKE_DPNHRESULT( 0x240 )
  1403. #define DPNERR_HOSTING                    MAKE_DPNHRESULT( 0x250 )
  1404. #define DPNERR_HOSTREJECTEDCONNECTION    MAKE_DPNHRESULT( 0x260 )
  1405. #define DPNERR_HOSTTERMINATEDSESSION    MAKE_DPNHRESULT( 0x270 )
  1406. #define DPNERR_INCOMPLETEADDRESS        MAKE_DPNHRESULT( 0x280 )
  1407. #define DPNERR_INVALIDADDRESSFORMAT        MAKE_DPNHRESULT( 0x290 )
  1408. #define DPNERR_INVALIDAPPLICATION        MAKE_DPNHRESULT( 0x300 )
  1409. #define DPNERR_INVALIDCOMMAND            MAKE_DPNHRESULT( 0x310 )
  1410. #define DPNERR_INVALIDDEVICEADDRESS        MAKE_DPNHRESULT( 0x320 )
  1411. #define DPNERR_INVALIDENDPOINT            MAKE_DPNHRESULT( 0x330 )
  1412. #define DPNERR_INVALIDFLAGS                MAKE_DPNHRESULT( 0x340 )
  1413. #define DPNERR_INVALIDGROUP                 MAKE_DPNHRESULT( 0x350 )
  1414. #define DPNERR_INVALIDHANDLE            MAKE_DPNHRESULT( 0x360 )
  1415. #define DPNERR_INVALIDHOSTADDRESS        MAKE_DPNHRESULT( 0x370 )
  1416. #define DPNERR_INVALIDINSTANCE            MAKE_DPNHRESULT( 0x380 )
  1417. #define DPNERR_INVALIDINTERFACE            MAKE_DPNHRESULT( 0x390 )
  1418. #define DPNERR_INVALIDOBJECT            MAKE_DPNHRESULT( 0x400 )
  1419. #define DPNERR_INVALIDPARAM                E_INVALIDARG
  1420. #define DPNERR_INVALIDPASSWORD            MAKE_DPNHRESULT( 0x410 )
  1421. #define DPNERR_INVALIDPLAYER            MAKE_DPNHRESULT( 0x420 )
  1422. #define DPNERR_INVALIDPOINTER            E_POINTER
  1423. #define DPNERR_INVALIDPRIORITY            MAKE_DPNHRESULT( 0x430 )
  1424. #define DPNERR_INVALIDSTRING            MAKE_DPNHRESULT( 0x440 )
  1425. #define DPNERR_INVALIDURL                MAKE_DPNHRESULT( 0x450 )
  1426. #define DPNERR_INVALIDVERSION            MAKE_DPNHRESULT( 0x460 )
  1427. #define DPNERR_NOCAPS                    MAKE_DPNHRESULT( 0x470 )
  1428. #define DPNERR_NOCONNECTION                MAKE_DPNHRESULT( 0x480 )
  1429. #define DPNERR_NOHOSTPLAYER                MAKE_DPNHRESULT( 0x490 )
  1430. #define DPNERR_NOINTERFACE                E_NOINTERFACE
  1431. #define DPNERR_NOMOREADDRESSCOMPONENTS    MAKE_DPNHRESULT( 0x500 )
  1432. #define DPNERR_NORESPONSE                MAKE_DPNHRESULT( 0x510 )
  1433. #define DPNERR_NOTALLOWED                MAKE_DPNHRESULT( 0x520 )
  1434. #define DPNERR_NOTHOST                    MAKE_DPNHRESULT( 0x530 )
  1435. #define DPNERR_NOTREADY                    MAKE_DPNHRESULT( 0x540 )
  1436. #define DPNERR_NOTREGISTERED            MAKE_DPNHRESULT( 0x550 )
  1437. #define DPNERR_OUTOFMEMORY                E_OUTOFMEMORY
  1438. #define DPNERR_PENDING                    DPNSUCCESS_PENDING
  1439. #define DPNERR_PLAYERALREADYINGROUP        MAKE_DPNHRESULT( 0x560 )
  1440. #define DPNERR_PLAYERLOST                MAKE_DPNHRESULT( 0x570 )
  1441. #define DPNERR_PLAYERNOTINGROUP            MAKE_DPNHRESULT( 0x580 )
  1442. #define DPNERR_PLAYERNOTREACHABLE        MAKE_DPNHRESULT( 0x590 )
  1443. #define DPNERR_SENDTOOLARGE                MAKE_DPNHRESULT( 0x600 )
  1444. #define DPNERR_SESSIONFULL                MAKE_DPNHRESULT( 0x610 )
  1445. #define DPNERR_TABLEFULL                MAKE_DPNHRESULT( 0x620 )
  1446. #define DPNERR_TIMEDOUT                    MAKE_DPNHRESULT( 0x630 )
  1447. #define DPNERR_UNINITIALIZED            MAKE_DPNHRESULT( 0x640 )
  1448. #define DPNERR_UNSUPPORTED                E_NOTIMPL
  1449. #define DPNERR_USERCANCEL                MAKE_DPNHRESULT( 0x650 )
  1450.  
  1451. #ifdef __cplusplus
  1452. }
  1453. #endif
  1454.  
  1455. #endif
  1456.  
  1457.